#include <iostream>
#include "riemann.hpp"
#include <cmath>
#include "timer.hpp"
#include <numeric>
#include <iomanip>

using namespace std;


int main()
{
timer t;
t.start();

    // Define the upper and lower limit and numer of subintervals
   double uLimmit = 4.;
   double lLimmit = 1.;
   int nIntervals = 1000000;

   auto f = [=] (double x) {return log(x)*sqrt(x); };


double result = riemann(f,lLimmit,uLimmit,nIntervals);
t.stop();
cout << std::setprecision(18) << result <<" is the result in: " << std::setprecision(18) << t.get_timing() << " seconds" << endl;

    return 0;
}


